﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Films.aspx.vb" Inherits="gojira.Films" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
    <p>Below is a complete list of all of the Godzilla films.
    </p>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="godzillaFilms" AllowSorting="True" style="margin-right: 1px" 
            BorderColor="Black" AllowPaging="True" float="center" Width="100%">
        <Columns>
            <asp:BoundField DataField="filmName" HeaderText="Film" 
                SortExpression="filmName" ItemStyle-HorizontalAlign="Center" />
            <asp:BoundField DataField="releaseYear" HeaderText="Release Year" 
                SortExpression="releaseYear" ItemStyle-HorizontalAlign="Center" />
            <asp:TemplateField HeaderText="Poster" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "filmDetail.aspx?ID=" + Eval("ID").toString() %>'>
                    <asp:Image Height="200px" Width="150px" ID="Image1" runat="server" ImageUrl='<%# Eval("poster") %>' />
                    </asp:HyperLink>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("poster") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="filmDetail.aspx?ID={0}" HeaderText="Detail" ItemStyle-HorizontalAlign="Center" 
                Text="Detail" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="godzillaFilms" runat="server" 
        ConnectionString="<%$ ConnectionStrings:godzillaFilms %>" 
        ProviderName="<%$ ConnectionStrings:godzillaFilms.ProviderName %>" 
        
            SelectCommand="SELECT * FROM [godzillaFilms] ORDER BY [ID]">
    </asp:SqlDataSource>
</p>
</asp:Content>
